package com.meituan.sdk.model.tuangouNg.smar.orderRefund;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 商家请求订单退款
* This file was automatically generated.
*/
@ApiMeta(
    path = "/tuangou/ng/smar/order/refund",
    businessId = 1,
    apiVersion = "10011",
    apiName = "order_refund",
    needAuth = true
)
public class OrderRefundRequest implements MeituanRequest<OrderRefundResponse> {
    /**
    * <p data-diff-id="ct-diff-id-cc5083fa-dec2-4132-80e6-c2ea6f70332e">业务标识，30为智能点餐</p>
    */
    @NotNull(message = "bizType不能为空")
    @SerializedName("bizType")
    private Integer bizType;
    /**
    * <p data-diff-id="ct-diff-id-d853bfa9-1e07-4215-be34-6dfe657467b5">美团订单号</p>
    */
    @NotNull(message = "orderId不能为空")
    @SerializedName("orderId")
    private Long orderId;
    /**
    * <p data-diff-id="ct-diff-id-011a5efd-1c33-462a-a258-6befc019b7dd"><strong><span style="color: rgb(81, 90, 110)">商户订单号，接单时必传</span></strong></p>
    */
    @NotBlank(message = "vendorOrderId不能为空")
    @SerializedName("vendorOrderId")
    private String vendorOrderId;
    /**
    * <p data-diff-id="ct-diff-id-0e2dfc1e-8d27-4126-875d-2d2dcf2a8cb7">请求时间戳</p>
    */
    @NotNull(message = "timestamp不能为空")
    @SerializedName("timestamp")
    private Long timestamp;
    /**
    * <p data-diff-id="ct-diff-id-0161bc22-993c-4273-a366-9b1e0b0ec72b">商家退款原因：</p><p data-diff-id="ct-diff-id-a0eb340d-6977-451d-a618-7209833a1356">MERCHANT_REFUND(1, "商家原因退款"),</p><p data-diff-id="ct-diff-id-233de9d7-54cd-4a77-8a7b-83c0daf2087f">OTHER_REASON_REFUND(2, "其他原因退款");</p>
    */
    @NotNull(message = "vendorDirectRefundType不能为空")
    @SerializedName("vendorDirectRefundType")
    private Integer vendorDirectRefundType;
    /**
    * <p data-diff-id="ct-diff-id-562fa42c-938f-4e83-a0b6-afd0ed7e7754"><strong><span style="color: rgb(81, 90, 110)">是否已取餐</span></strong></p>
    */
    @SerializedName("consumed")
    private Boolean consumed;
    /**
    * <p data-diff-id="ct-diff-id-bad3a355-994b-4a30-97fc-0f9af82f09ae">操作者名称</p>
    */
    @NotBlank(message = "operatorName不能为空")
    @SerializedName("operatorName")
    private String operatorName;
    /**
    * <p data-diff-id="ct-diff-id-5a1373eb-4336-49a9-9cf7-aa1f382f7d85"><strong><span style="color: rgb(81, 90, 110)">操作者Id</span></strong></p>
    */
    @NotBlank(message = "operatorId不能为空")
    @SerializedName("operatorId")
    private String operatorId;
    /**
    * <p data-diff-id="ct-diff-id-4b870039-ddae-45b2-b655-6653983531cf"><strong><span style="color: rgb(81, 90, 110)">申请退款原因</span></strong></p>
    */
    @NotBlank(message = "refundReason不能为空")
    @SerializedName("refundReason")
    private String refundReason;
    /**
    * <p data-diff-id="ct-diff-id-2da4cc19-77ca-4b0d-933a-831200baa00b"><strong><span style="color: rgb(81, 90, 110)">处理时间</span></strong></p>
    */
    @NotNull(message = "handleTime不能为空")
    @SerializedName("handleTime")
    private Long handleTime;

    public Integer getBizType() {
        return bizType;
    }
    public void setBizType(Integer bizType) {
        this.bizType = bizType;
    }
    public Long getOrderId() {
        return orderId;
    }
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
    public String getVendorOrderId() {
        return vendorOrderId;
    }
    public void setVendorOrderId(String vendorOrderId) {
        this.vendorOrderId = vendorOrderId;
    }
    public Long getTimestamp() {
        return timestamp;
    }
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
    public Integer getVendorDirectRefundType() {
        return vendorDirectRefundType;
    }
    public void setVendorDirectRefundType(Integer vendorDirectRefundType) {
        this.vendorDirectRefundType = vendorDirectRefundType;
    }
    public Boolean getConsumed() {
        return consumed;
    }
    public void setConsumed(Boolean consumed) {
        this.consumed = consumed;
    }
    public String getOperatorName() {
        return operatorName;
    }
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
    public String getOperatorId() {
        return operatorId;
    }
    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }
    public String getRefundReason() {
        return refundReason;
    }
    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }
    public Long getHandleTime() {
        return handleTime;
    }
    public void setHandleTime(Long handleTime) {
        this.handleTime = handleTime;
    }


    @Override
    public MeituanResponse<OrderRefundResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<OrderRefundResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "OrderRefundRequest{" + "bizType=" + bizType + "," + "orderId=" + orderId + "," + "vendorOrderId=" + vendorOrderId + "," + "timestamp=" + timestamp + "," + "vendorDirectRefundType=" + vendorDirectRefundType + "," + "consumed=" + consumed + "," + "operatorName=" + operatorName + "," + "operatorId=" + operatorId + "," + "refundReason=" + refundReason + "," + "handleTime=" + handleTime + "}";
    }
}
